<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Vector2 - Documentation</title>

    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
</head>
<body>

<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
  <div class="navicon"></div>
</label>

<label for="nav-trigger" class="overlay"></label>

<nav>
    <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="module.exports.html">exports</a></li><li><a href="SmilesDrawer.ArrayHelper.html">ArrayHelper</a><ul class='methods'><li data-type='method'><a href="SmilesDrawer.ArrayHelper.html#.clone">clone</a></li><li data-type='method'><a href="SmilesDrawer.ArrayHelper.html#.contains">contains</a></li><li data-type='method'><a href="SmilesDrawer.ArrayHelper.html#.containsAll">containsAll</a></li><li data-type='method'><a href="SmilesDrawer.ArrayHelper.html#.count">count</a></li><li data-type='method'><a href="SmilesDrawer.ArrayHelper.html#.deepCopy">deepCopy</a></li><li data-type='method'><a href="SmilesDrawer.ArrayHelper.html#.each">each</a></li><li data-type='method'><a href="SmilesDrawer.ArrayHelper.html#.get">get</a></li><li data-type='method'><a href="SmilesDrawer.ArrayHelper.html#.intersection">intersection</a></li><li data-type='method'><a href="SmilesDrawer.ArrayHelper.html#.merge">merge</a></li><li data-type='method'><a href="SmilesDrawer.ArrayHelper.html#.print">print</a></li><li data-type='method'><a href="SmilesDrawer.ArrayHelper.html#.remove">remove</a></li><li data-type='method'><a href="SmilesDrawer.ArrayHelper.html#.removeAll">removeAll</a></li><li data-type='method'><a href="SmilesDrawer.ArrayHelper.html#.removeUnique">removeUnique</a></li><li data-type='method'><a href="SmilesDrawer.ArrayHelper.html#.sortByAtomicNumberDesc">sortByAtomicNumberDesc</a></li><li data-type='method'><a href="SmilesDrawer.ArrayHelper.html#.toggle">toggle</a></li><li data-type='method'><a href="SmilesDrawer.ArrayHelper.html#.unique">unique</a></li></ul></li><li><a href="SmilesDrawer.Atom.html">Atom</a><ul class='methods'><li data-type='method'><a href="SmilesDrawer.Atom.html#.getDuplicateAtomicNumbers">getDuplicateAtomicNumbers</a></li><li data-type='method'><a href="SmilesDrawer.Atom.html#.hasDuplicateAtomicNumbers">hasDuplicateAtomicNumbers</a></li><li data-type='method'><a href="SmilesDrawer.Atom.html#.sortByAtomicNumber">sortByAtomicNumber</a></li><li data-type='method'><a href="SmilesDrawer.Atom.html#addAnchoredRing">addAnchoredRing</a></li><li data-type='method'><a href="SmilesDrawer.Atom.html#addNeighbouringElement">addNeighbouringElement</a></li><li data-type='method'><a href="SmilesDrawer.Atom.html#attachPseudoElement">attachPseudoElement</a></li><li data-type='method'><a href="SmilesDrawer.Atom.html#backupRings">backupRings</a></li><li data-type='method'><a href="SmilesDrawer.Atom.html#getAtomicNumber">getAtomicNumber</a></li><li data-type='method'><a href="SmilesDrawer.Atom.html#getAttachedPseudoElements">getAttachedPseudoElements</a></li><li data-type='method'><a href="SmilesDrawer.Atom.html#getAttachedPseudoElementsCount">getAttachedPseudoElementsCount</a></li><li data-type='method'><a href="SmilesDrawer.Atom.html#getOrder">getOrder</a></li><li data-type='method'><a href="SmilesDrawer.Atom.html#getRingbondCount">getRingbondCount</a></li><li data-type='method'><a href="SmilesDrawer.Atom.html#haveCommonRingbond">haveCommonRingbond</a></li><li data-type='method'><a href="SmilesDrawer.Atom.html#neighbouringElementsEqual">neighbouringElementsEqual</a></li><li data-type='method'><a href="SmilesDrawer.Atom.html#restoreRings">restoreRings</a></li><li data-type='method'><a href="SmilesDrawer.Atom.html#setOrder">setOrder</a></li></ul></li><li><a href="SmilesDrawer.CanvasWrapper.html">CanvasWrapper</a><ul class='methods'><li data-type='method'><a href="SmilesDrawer.CanvasWrapper.html#clear">clear</a></li><li data-type='method'><a href="SmilesDrawer.CanvasWrapper.html#drawAromaticityRing">drawAromaticityRing</a></li><li data-type='method'><a href="SmilesDrawer.CanvasWrapper.html#drawBall">drawBall</a></li><li data-type='method'><a href="SmilesDrawer.CanvasWrapper.html#drawCircle">drawCircle</a></li><li data-type='method'><a href="SmilesDrawer.CanvasWrapper.html#drawDashedWedge">drawDashedWedge</a></li><li data-type='method'><a href="SmilesDrawer.CanvasWrapper.html#drawDebugPoint">drawDebugPoint</a></li><li data-type='method'><a href="SmilesDrawer.CanvasWrapper.html#drawDebugText">drawDebugText</a></li><li data-type='method'><a href="SmilesDrawer.CanvasWrapper.html#drawLine">drawLine</a></li><li data-type='method'><a href="SmilesDrawer.CanvasWrapper.html#drawPoint">drawPoint</a></li><li data-type='method'><a href="SmilesDrawer.CanvasWrapper.html#drawText">drawText</a></li><li data-type='method'><a href="SmilesDrawer.CanvasWrapper.html#drawWedge">drawWedge</a></li><li data-type='method'><a href="SmilesDrawer.CanvasWrapper.html#getColor">getColor</a></li><li data-type='method'><a href="SmilesDrawer.CanvasWrapper.html#reset">reset</a></li><li data-type='method'><a href="SmilesDrawer.CanvasWrapper.html#scale">scale</a></li><li data-type='method'><a href="SmilesDrawer.CanvasWrapper.html#setTheme">setTheme</a></li><li data-type='method'><a href="SmilesDrawer.CanvasWrapper.html#updateSize">updateSize</a></li></ul></li><li><a href="SmilesDrawer.Edge.html">Edge</a><ul class='methods'><li data-type='method'><a href="SmilesDrawer.Edge.html#getBondCount">getBondCount</a></li></ul></li><li><a href="SmilesDrawer.Graph.html">Graph</a><ul class='methods'><li data-type='method'><a href="SmilesDrawer.Graph.html#._ccCountDfs">_ccCountDfs</a></li><li data-type='method'><a href="SmilesDrawer.Graph.html#._ccGetDfs">_ccGetDfs</a></li><li data-type='method'><a href="SmilesDrawer.Graph.html#.getConnectedComponentCount">getConnectedComponentCount</a></li><li data-type='method'><a href="SmilesDrawer.Graph.html#.getConnectedComponents">getConnectedComponents</a></li><li data-type='method'><a href="SmilesDrawer.Graph.html#_bridgeDfs">_bridgeDfs</a></li><li data-type='method'><a href="SmilesDrawer.Graph.html#_init">_init</a></li><li data-type='method'><a href="SmilesDrawer.Graph.html#_initInfos">_initInfos</a></li><li data-type='method'><a href="SmilesDrawer.Graph.html#addEdge">addEdge</a></li><li data-type='method'><a href="SmilesDrawer.Graph.html#addVertex">addVertex</a></li><li data-type='method'><a href="SmilesDrawer.Graph.html#clear">clear</a></li><li data-type='method'><a href="SmilesDrawer.Graph.html#getAdjacencyList">getAdjacencyList</a></li><li data-type='method'><a href="SmilesDrawer.Graph.html#getAdjacencyMatrix">getAdjacencyMatrix</a></li><li data-type='method'><a href="SmilesDrawer.Graph.html#getBridges">getBridges</a></li><li data-type='method'><a href="SmilesDrawer.Graph.html#getComponentsAdjacencyMatrix">getComponentsAdjacencyMatrix</a></li><li data-type='method'><a href="SmilesDrawer.Graph.html#getDistanceMatrix">getDistanceMatrix</a></li><li data-type='method'><a href="SmilesDrawer.Graph.html#getEdge">getEdge</a></li><li data-type='method'><a href="SmilesDrawer.Graph.html#getEdgeList">getEdgeList</a></li><li data-type='method'><a href="SmilesDrawer.Graph.html#getEdges">getEdges</a></li><li data-type='method'><a href="SmilesDrawer.Graph.html#getSubgraphAdjacencyList">getSubgraphAdjacencyList</a></li><li data-type='method'><a href="SmilesDrawer.Graph.html#getSubgraphAdjacencyMatrix">getSubgraphAdjacencyMatrix</a></li><li data-type='method'><a href="SmilesDrawer.Graph.html#getSubgraphDistanceMatrix">getSubgraphDistanceMatrix</a></li><li data-type='method'><a href="SmilesDrawer.Graph.html#getVertexList">getVertexList</a></li><li data-type='method'><a href="SmilesDrawer.Graph.html#hasEdge">hasEdge</a></li><li data-type='method'><a href="SmilesDrawer.Graph.html#kkLayout">kkLayout</a></li><li data-type='method'><a href="SmilesDrawer.Graph.html#traverseBF">traverseBF</a></li></ul></li><li><a href="SmilesDrawer.Line.html">Line</a><ul class='methods'><li data-type='method'><a href="SmilesDrawer.Line.html#clone">clone</a></li><li data-type='method'><a href="SmilesDrawer.Line.html#getAngle">getAngle</a></li><li data-type='method'><a href="SmilesDrawer.Line.html#getLeftChiral">getLeftChiral</a></li><li data-type='method'><a href="SmilesDrawer.Line.html#getLeftElement">getLeftElement</a></li><li data-type='method'><a href="SmilesDrawer.Line.html#getLeftVector">getLeftVector</a></li><li data-type='method'><a href="SmilesDrawer.Line.html#getLength">getLength</a></li><li data-type='method'><a href="SmilesDrawer.Line.html#getNormals">getNormals</a></li><li data-type='method'><a href="SmilesDrawer.Line.html#getRightChiral">getRightChiral</a></li><li data-type='method'><a href="SmilesDrawer.Line.html#getRightElement">getRightElement</a></li><li data-type='method'><a href="SmilesDrawer.Line.html#getRightVector">getRightVector</a></li><li data-type='method'><a href="SmilesDrawer.Line.html#rotate">rotate</a></li><li data-type='method'><a href="SmilesDrawer.Line.html#rotateToXAxis">rotateToXAxis</a></li><li data-type='method'><a href="SmilesDrawer.Line.html#setLeftVector">setLeftVector</a></li><li data-type='method'><a href="SmilesDrawer.Line.html#setRightVector">setRightVector</a></li><li data-type='method'><a href="SmilesDrawer.Line.html#shorten">shorten</a></li><li data-type='method'><a href="SmilesDrawer.Line.html#shortenFrom">shortenFrom</a></li><li data-type='method'><a href="SmilesDrawer.Line.html#shortenLeft">shortenLeft</a></li><li data-type='method'><a href="SmilesDrawer.Line.html#shortenRight">shortenRight</a></li><li data-type='method'><a href="SmilesDrawer.Line.html#shortenTo">shortenTo</a></li></ul></li><li><a href="SmilesDrawer.Ring.html">Ring</a><ul class='methods'><li data-type='method'><a href="SmilesDrawer.Ring.html#clone">clone</a></li><li data-type='method'><a href="SmilesDrawer.Ring.html#contains">contains</a></li><li data-type='method'><a href="SmilesDrawer.Ring.html#eachMember">eachMember</a></li><li data-type='method'><a href="SmilesDrawer.Ring.html#getAngle">getAngle</a></li><li data-type='method'><a href="SmilesDrawer.Ring.html#getDoubleBondCount">getDoubleBondCount</a></li><li data-type='method'><a href="SmilesDrawer.Ring.html#getOrderedNeighbours">getOrderedNeighbours</a></li><li data-type='method'><a href="SmilesDrawer.Ring.html#getPolygon">getPolygon</a></li><li data-type='method'><a href="SmilesDrawer.Ring.html#getSize">getSize</a></li><li data-type='method'><a href="SmilesDrawer.Ring.html#isBenzeneLike">isBenzeneLike</a></li></ul></li><li><a href="SmilesDrawer.RingConnection.html">RingConnection</a><ul class='methods'><li data-type='method'><a href="SmilesDrawer.RingConnection.html#.getNeighbours">getNeighbours</a></li><li data-type='method'><a href="SmilesDrawer.RingConnection.html#.getVertices">getVertices</a></li><li data-type='method'><a href="SmilesDrawer.RingConnection.html#.isBridge">isBridge</a></li><li data-type='method'><a href="SmilesDrawer.RingConnection.html#addVertex">addVertex</a></li><li data-type='method'><a href="SmilesDrawer.RingConnection.html#containsRing">containsRing</a></li><li data-type='method'><a href="SmilesDrawer.RingConnection.html#isBridge">isBridge</a></li><li data-type='method'><a href="SmilesDrawer.RingConnection.html#updateOther">updateOther</a></li></ul></li><li><a href="SmilesDrawer.SSSR.html">SSSR</a><ul class='methods'><li data-type='method'><a href="SmilesDrawer.SSSR.html#.areSetsEqual">areSetsEqual</a></li><li data-type='method'><a href="SmilesDrawer.SSSR.html#.bondsToAtoms">bondsToAtoms</a></li><li data-type='method'><a href="SmilesDrawer.SSSR.html#.getBondCount">getBondCount</a></li><li data-type='method'><a href="SmilesDrawer.SSSR.html#.getEdgeCount">getEdgeCount</a></li><li data-type='method'><a href="SmilesDrawer.SSSR.html#.getEdgeList">getEdgeList</a></li><li data-type='method'><a href="SmilesDrawer.SSSR.html#.getPathIncludedDistanceMatrices">getPathIncludedDistanceMatrices</a></li><li data-type='method'><a href="SmilesDrawer.SSSR.html#.getRingCandidates">getRingCandidates</a></li><li data-type='method'><a href="SmilesDrawer.SSSR.html#.getRings">getRings</a></li><li data-type='method'><a href="SmilesDrawer.SSSR.html#.getSSSR">getSSSR</a></li><li data-type='method'><a href="SmilesDrawer.SSSR.html#.isSupersetOf">isSupersetOf</a></li><li data-type='method'><a href="SmilesDrawer.SSSR.html#.matrixToString">matrixToString</a></li><li data-type='method'><a href="SmilesDrawer.SSSR.html#.pathSetsContain">pathSetsContain</a></li></ul></li><li><a href="SmilesDrawer.Vector2.html">Vector2</a><ul class='methods'><li data-type='method'><a href="SmilesDrawer.Vector2.html#add">add</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#angle">angle</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#clockwise">clockwise</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#clone">clone</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#distance">distance</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#distanceSq">distanceSq</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#divide">divide</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#getRotateAwayFromAngle">getRotateAwayFromAngle</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#getRotateToAngle">getRotateToAngle</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#getRotateTowardsAngle">getRotateTowardsAngle</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#invert">invert</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#isInPolygon">isInPolygon</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#length">length</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#lengthSq">lengthSq</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#multiply">multiply</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#multiplyScalar">multiplyScalar</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#normalize">normalize</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#normalized">normalized</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#rotate">rotate</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#rotateAround">rotateAround</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#rotateAwayFrom">rotateAwayFrom</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#rotateTo">rotateTo</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#sameSideAs">sameSideAs</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#subtract">subtract</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#toString">toString</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#whichSide">whichSide</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#.add">add</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#.angle">angle</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#.averageDirection">averageDirection</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#.divide">divide</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#.dot">dot</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#.midpoint">midpoint</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#.multiply">multiply</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#.multiplyScalar">multiplyScalar</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#.normals">normals</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#.scalarProjection">scalarProjection</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#.subtract">subtract</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#.threePointangle">threePointangle</a></li><li data-type='method'><a href="SmilesDrawer.Vector2.html#.units">units</a></li></ul></li><li><a href="SmilesDrawer.Vertex.html">Vertex</a><ul class='methods'><li data-type='method'><a href="SmilesDrawer.Vertex.html#addChild">addChild</a></li><li data-type='method'><a href="SmilesDrawer.Vertex.html#clone">clone</a></li><li data-type='method'><a href="SmilesDrawer.Vertex.html#equals">equals</a></li><li data-type='method'><a href="SmilesDrawer.Vertex.html#getAngle">getAngle</a></li><li data-type='method'><a href="SmilesDrawer.Vertex.html#getDrawnNeighbours">getDrawnNeighbours</a></li><li data-type='method'><a href="SmilesDrawer.Vertex.html#getNeighbourCount">getNeighbourCount</a></li><li data-type='method'><a href="SmilesDrawer.Vertex.html#getNeighbours">getNeighbours</a></li><li data-type='method'><a href="SmilesDrawer.Vertex.html#getNextInRing">getNextInRing</a></li><li data-type='method'><a href="SmilesDrawer.Vertex.html#getSpanningTreeNeighbours">getSpanningTreeNeighbours</a></li><li data-type='method'><a href="SmilesDrawer.Vertex.html#getTextDirection">getTextDirection</a></li><li data-type='method'><a href="SmilesDrawer.Vertex.html#isTerminal">isTerminal</a></li><li data-type='method'><a href="SmilesDrawer.Vertex.html#setParentVertexId">setParentVertexId</a></li><li data-type='method'><a href="SmilesDrawer.Vertex.html#setPosition">setPosition</a></li><li data-type='method'><a href="SmilesDrawer.Vertex.html#setPositionFromVector">setPositionFromVector</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#addRing">addRing</a></li><li><a href="global.html#addRingConnection">addRingConnection</a></li><li><a href="global.html#apothem">apothem</a></li><li><a href="global.html#areVerticesInSameRing">areVerticesInSameRing</a></li><li><a href="global.html#backupRingInformation">backupRingInformation</a></li><li><a href="global.html#centralAngle">centralAngle</a></li><li><a href="global.html#chooseSide">chooseSide</a></li><li><a href="global.html#createBridgedRing">createBridgedRing</a></li><li><a href="global.html#createNextBond">createNextBond</a></li><li><a href="global.html#createRing">createRing</a></li><li><a href="global.html#draw">draw</a></li><li><a href="global.html#drawEdge">drawEdge</a></li><li><a href="global.html#drawEdges">drawEdges</a></li><li><a href="global.html#drawVertices">drawVertices</a></li><li><a href="global.html#edgeRingCount">edgeRingCount</a></li><li><a href="global.html#extend">extend</a></li><li><a href="global.html#getBondCount">getBondCount</a></li><li><a href="global.html#getBridgedRingRings">getBridgedRingRings</a></li><li><a href="global.html#getBridgedRings">getBridgedRings</a></li><li><a href="global.html#getClosestVertex">getClosestVertex</a></li><li><a href="global.html#getCommonRingbondNeighbour">getCommonRingbondNeighbour</a></li><li><a href="global.html#getCommonRings">getCommonRings</a></li><li><a href="global.html#getCurrentCenterOfMass">getCurrentCenterOfMass</a></li><li><a href="global.html#getCurrentCenterOfMassInNeigbourhood">getCurrentCenterOfMassInNeigbourhood</a></li><li><a href="global.html#getEdgeNormals">getEdgeNormals</a></li><li><a href="global.html#getFusedRings">getFusedRings</a></li><li><a href="global.html#getHeavyAtomCount">getHeavyAtomCount</a></li><li><a href="global.html#getLargestOrAromaticCommonRing">getLargestOrAromaticCommonRing</a></li><li><a href="global.html#getNonRingNeighbours">getNonRingNeighbours</a></li><li><a href="global.html#getOverlapScore">getOverlapScore</a></li><li><a href="global.html#getRing">getRing</a></li><li><a href="global.html#getRingbondType">getRingbondType</a></li><li><a href="global.html#getRingConnection">getRingConnection</a></li><li><a href="global.html#getRingConnections">getRingConnections</a></li><li><a href="global.html#getRingCount">getRingCount</a></li><li><a href="global.html#getSpiros">getSpiros</a></li><li><a href="global.html#getSubringCenter">getSubringCenter</a></li><li><a href="global.html#getSubtreeOverlapScore">getSubtreeOverlapScore</a></li><li><a href="global.html#getTotalOverlapScore">getTotalOverlapScore</a></li><li><a href="global.html#getTreeDepth">getTreeDepth</a></li><li><a href="global.html#getVerticesAt">getVerticesAt</a></li><li><a href="global.html#hasBridgedRing">hasBridgedRing</a></li><li><a href="global.html#initPseudoElements">initPseudoElements</a></li><li><a href="global.html#initRings">initRings</a></li><li><a href="global.html#innerAngle">innerAngle</a></li><li><a href="global.html#isEdgeInRing">isEdgeInRing</a></li><li><a href="global.html#isEdgeRotatable">isEdgeRotatable</a></li><li><a href="global.html#isPartOfBridgedRing">isPartOfBridgedRing</a></li><li><a href="global.html#isPointInRing">isPointInRing</a></li><li><a href="global.html#isRingAromatic">isRingAromatic</a></li><li><a href="global.html#meanAngle">meanAngle</a></li><li><a href="global.html#parityOfPermutation">parityOfPermutation</a></li><li><a href="global.html#polyCircumradius">polyCircumradius</a></li><li><a href="global.html#position">position</a></li><li><a href="global.html#printRingInfo">printRingInfo</a></li><li><a href="global.html#removeRing">removeRing</a></li><li><a href="global.html#removeRingConnection">removeRingConnection</a></li><li><a href="global.html#removeRingConnectionsBetween">removeRingConnectionsBetween</a></li><li><a href="global.html#resolvePrimaryOverlaps">resolvePrimaryOverlaps</a></li><li><a href="global.html#resolveSecondaryOverlaps">resolveSecondaryOverlaps</a></li><li><a href="global.html#restoreRingInformation">restoreRingInformation</a></li><li><a href="global.html#rotateSubtree">rotateSubtree</a></li><li><a href="global.html#round">round</a></li><li><a href="global.html#setRingCenter">setRingCenter</a></li><li><a href="global.html#SmilesDrawer">SmilesDrawer</a></li><li><a href="global.html#toDeg">toDeg</a></li><li><a href="global.html#toRad">toRad</a></li><li><a href="global.html#traverseTree">traverseTree</a></li></ul>
</nav>

<div id="main">
    
    <h1 class="page-title">Vector2</h1>
    

    




<section>

<header>
    
        <h2>
            <span class="ancestors"><a href="global.html#SmilesDrawer">SmilesDrawer</a>.</span>
        
        Vector2
        </h2>
        
            <div class="class-description"><p>A class representing a 2D vector.</p></div>
        
    
</header>

<article>
    <div class="container-overview">
    
        

    
    <h2>Constructor</h2>
    

    <h4 class="name" id="Vector2"><span class="type-signature"></span>new Vector2<span class="signature">(x, y)</span><span class="type-signature"></span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line7">line 7</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>



    <h5 class="subsection-title">Properties:</h5>

    

<table class="props">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last"><p>The x component of the vector.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last"><p>The y component of the vector.</p></td>
        </tr>

    
    </tbody>
</table>






<div class="description">
    <p>The constructor of the class Vector2.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>x</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last"><p>The initial x coordinate value.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>y</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last"><p>The initial y coordinate value.</p></td>
        </tr>

    
    </tbody>
</table>
















    
    </div>

    

    

    

     

    

    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    <h4 class="name" id="add"><span class="type-signature"></span>add<span class="signature">(vec)</span><span class="type-signature"> &rarr; {<a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line51">line 51</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Add the x and y coordinate values of a vector to the x and y coordinate values of this vector.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>vec</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>Another vector.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Returns itself.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="angle"><span class="type-signature"></span>angle<span class="signature">()</span><span class="type-signature"> &rarr; {Number}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line127">line 127</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Returns the angle of this vector in relation to the coordinate system.</p>
</div>























<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The angle in radians.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Number</span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="clockwise"><span class="type-signature"></span>clockwise<span class="signature">(vec)</span><span class="type-signature"> &rarr; {Number}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line157">line 157</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Checks whether or not this vector is in a clockwise or counter-clockwise rotational direction compared to another vector in relation to the coordinate system.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>vec</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>Another vector.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Returns -1, 0 or 1 if the vector supplied as an argument is clockwise, neutral or counter-clockwise respectively to this vector in relation to the coordinate system.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Number</span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="clone"><span class="type-signature"></span>clone<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line32">line 32</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Clones this vector and returns the clone.</p>
</div>























<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The clone of this vector.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="distance"><span class="type-signature"></span>distance<span class="signature">(vec)</span><span class="type-signature"> &rarr; {Number}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line137">line 137</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Returns the euclidean distance between this vector and another vector.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>vec</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>A vector.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The euclidean distance between the two vectors.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Number</span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="distanceSq"><span class="type-signature"></span>distanceSq<span class="signature">(vec)</span><span class="type-signature"> &rarr; {Number}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line147">line 147</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Returns the squared euclidean distance between this vector and another vector. When only the relative distances of a set of vectors are needed, this is is less expensive than using distance(vec).</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>vec</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>Another vector.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The squared euclidean distance of the two vectors.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Number</span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="divide"><span class="type-signature"></span>divide<span class="signature">(scalar)</span><span class="type-signature"> &rarr; {<a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line77">line 77</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Divide the x and y coordinate values of this vector by a scalar.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>scalar</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last"><p>The scalar.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Returns itself.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="getRotateAwayFromAngle"><span class="type-signature"></span>getRotateAwayFromAngle<span class="signature">(vec, center, angle)</span><span class="type-signature"> &rarr; {Number}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line266">line 266</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Returns the angle in radians used to rotate this vector away from a given vector.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>vec</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>The vector this one is rotated away from.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>center</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>The rotational center.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>angle</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last"><p>The angle by which to rotate.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The angle in radians.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Number</span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="getRotateToAngle"><span class="type-signature"></span>getRotateToAngle<span class="signature">(vec, center)</span><span class="type-signature"> &rarr; {Number}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line317">line 317</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Gets the angles between this vector and another vector around a common center of rotation.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>vec</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>Another vector.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>center</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>The center of rotation.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The angle between this vector and another vector around a center of rotation in radians.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Number</span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="getRotateTowardsAngle"><span class="type-signature"></span>getRotateTowardsAngle<span class="signature">(vec, center, angle)</span><span class="type-signature"> &rarr; {Number}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line292">line 292</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Returns the angle in radians used to rotate this vector towards a given vector.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>vec</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>The vector this one is rotated towards to.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>center</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>The rotational center.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>angle</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last"><p>The angle by which to rotate.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The angle in radians.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Number</span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="invert"><span class="type-signature"></span>invert<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line115">line 115</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Inverts this vector. Same as multiply(-1.0).</p>
</div>























<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Returns itself.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="isInPolygon"><span class="type-signature"></span>isInPolygon<span class="signature">(polygon)</span><span class="type-signature"> &rarr; {Boolean}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line331">line 331</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Checks whether a vector lies within a polygon spanned by a set of vectors.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>polygon</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a>></span>


            
            </td>

            

            

            <td class="description last"><p>An array of vectors spanning the polygon.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>A boolean indicating whether or not this vector is within a polygon.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Boolean</span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="length"><span class="type-signature"></span>length<span class="signature">()</span><span class="type-signature"> &rarr; {Number}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line352">line 352</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Returns the length of this vector.</p>
</div>























<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The length of this vector.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Number</span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="lengthSq"><span class="type-signature"></span>lengthSq<span class="signature">()</span><span class="type-signature"> &rarr; {Number}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line361">line 361</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Returns the square of the length of this vector.</p>
</div>























<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The square of the length of this vector.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Number</span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="multiply"><span class="type-signature"></span>multiply<span class="signature">(v)</span><span class="type-signature"> &rarr; {<a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line90">line 90</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Multiply the x and y coordinate values of this vector by the values of another vector.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>v</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>A vector.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Returns itself.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="multiplyScalar"><span class="type-signature"></span>multiplyScalar<span class="signature">(scalar)</span><span class="type-signature"> &rarr; {<a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line103">line 103</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Multiply the x and y coordinate values of this vector by a scalar.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>scalar</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last"><p>The scalar.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Returns itself.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="normalize"><span class="type-signature"></span>normalize<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line370">line 370</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Normalizes this vector.</p>
</div>























<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Returns itself.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="normalized"><span class="type-signature"></span>normalized<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line381">line 381</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Returns a normalized copy of this vector.</p>
</div>























<h5>Returns:</h5>

        
<div class="param-desc">
    <p>A normalized copy of this vector.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="rotate"><span class="type-signature"></span>rotate<span class="signature">(angle)</span><span class="type-signature"> &rarr; {<a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line177">line 177</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Rotates this vector by a given number of radians around the origin of the coordinate system.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>angle</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last"><p>The angle in radians to rotate the vector.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Returns itself.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="rotateAround"><span class="type-signature"></span>rotateAround<span class="signature">(angle, vec)</span><span class="type-signature"> &rarr; {<a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line198">line 198</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Rotates this vector around another vector.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>angle</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last"><p>The angle in radians to rotate the vector.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>vec</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>The vector which is used as the rotational center.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Returns itself.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="rotateAwayFrom"><span class="type-signature"></span>rotateAwayFrom<span class="signature">(vec, center, angle)</span><span class="type-signature"></span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line243">line 243</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Rotates the vector away from a specified vector around a center.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>vec</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>The vector this one is rotated away from.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>center</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>The rotational center.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>angle</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last"><p>The angle by which to rotate.</p></td>
        </tr>

    
    </tbody>
</table>
















        
            

    

    <h4 class="name" id="rotateTo"><span class="type-signature"></span>rotateTo<span class="signature">(vec, center, offsetAngle<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line222">line 222</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Rotate a vector around a given center to the same angle as another vector (so that the two vectors and the center are in a line, with both vectors on one side of the center), keeps the distance from this vector to the center.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>vec</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The vector to rotate this vector to.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>center</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            
                <td class="default">
                
                </td>
            

            <td class="description last"><p>The rotational center.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>offsetAngle</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    <code>0.0</code>
                
                </td>
            

            <td class="description last"><p>An additional amount of radians to rotate the vector.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Returns itself.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="sameSideAs"><span class="type-signature"></span>sameSideAs<span class="signature">(vecA, vecB, vecC)</span><span class="type-signature"> &rarr; {Boolean}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line404">line 404</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Checks whether or not this vector is on the same side of a line spanned by two vectors as another vector.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>vecA</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>A vector spanning the line.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>vecB</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>A vector spanning the line.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>vecC</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>A vector to check whether or not it is on the same side as this vector.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Returns a boolean indicating whether or not this vector is on the same side as another vector.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Boolean</span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="subtract"><span class="type-signature"></span>subtract<span class="signature">(vec)</span><span class="type-signature"> &rarr; {<a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line64">line 64</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Subtract the x and y coordinate values of a vector from the x and y coordinate values of this vector.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>vec</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>Another vector.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Returns itself.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="toString"><span class="type-signature"></span>toString<span class="signature">()</span><span class="type-signature"> &rarr; {String}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line41">line 41</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Returns a string representation of this vector.</p>
</div>























<h5>Returns:</h5>

        
<div class="param-desc">
    <p>A string representation of this vector.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">String</span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id="whichSide"><span class="type-signature"></span>whichSide<span class="signature">(vecA, vecB)</span><span class="type-signature"> &rarr; {Number}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line392">line 392</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Calculates which side of a line spanned by two vectors this vector is.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>vecA</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>A vector.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>vecB</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>A vector.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>A number indicating the side of this vector, given a line spanned by two other vectors.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Number</span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id=".add"><span class="type-signature">(static) </span>add<span class="signature">(vecA, vecB)</span><span class="type-signature"> &rarr; {<a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line419">line 419</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Adds two vectors and returns the result as a new vector.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>vecA</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>A summand.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>vecB</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>A summand.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Returns the sum of two vectors.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id=".angle"><span class="type-signature">(static) </span>angle<span class="signature">(vecA, vecB)</span><span class="type-signature"> &rarr; {Number}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line541">line 541</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Returns the angle between two vectors.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>vecA</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>A vector.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>vecB</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>A vector.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The angle between two vectors in radians.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Number</span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id=".averageDirection"><span class="type-signature">(static) </span>averageDirection<span class="signature">(vecs)</span><span class="type-signature"> &rarr; {<a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line586">line 586</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Returns the average vector (normalized) of the input vectors.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>vecs</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array()</span>


            
            </td>

            

            

            <td class="description last"><p>An array containing vectors.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The resulting vector (normalized).</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id=".divide"><span class="type-signature">(static) </span>divide<span class="signature">(vecA, vecB)</span><span class="type-signature"> &rarr; {<a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line513">line 513</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Divides a vector by another vector and returns the result as new vector.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>vecA</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>The dividend.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>vecB</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>The divisor.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The fraction of the two vectors.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id=".dot"><span class="type-signature">(static) </span>dot<span class="signature">(vecA, vecB)</span><span class="type-signature"> &rarr; {Number}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line529">line 529</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Returns the dot product of two vectors.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>vecA</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>A vector.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>vecB</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>A vector.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The dot product of two vectors.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Number</span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id=".midpoint"><span class="type-signature">(static) </span>midpoint<span class="signature">(vecA, vecB)</span><span class="type-signature"> &rarr; {<a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line467">line 467</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Returns the midpoint of a line spanned by two vectors.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>vecA</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>A vector spanning the line.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>vecB</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>A vector spanning the line.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The midpoint of the line spanned by two vectors.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id=".multiply"><span class="type-signature">(static) </span>multiply<span class="signature">(vecA, vecB)</span><span class="type-signature"> &rarr; {<a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line443">line 443</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Multiplies two vectors (value by value) and returns the result.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>vecA</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>A vector.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>vecB</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>A vector.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Returns the product of two vectors.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id=".multiplyScalar"><span class="type-signature">(static) </span>multiplyScalar<span class="signature">(vec, scalar)</span><span class="type-signature"> &rarr; {<a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line455">line 455</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Multiplies two vectors (value by value) and returns the result.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>vec</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>A vector.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>scalar</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            

            

            <td class="description last"><p>A scalar.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Returns the product of two vectors.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id=".normals"><span class="type-signature">(static) </span>normals<span class="signature">(vecA, vecB)</span><span class="type-signature"> &rarr; {Array.&lt;<a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a>>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line479">line 479</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Returns the normals of a line spanned by two vectors.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>vecA</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>A vector spanning the line.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>vecB</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>A vector spanning the line.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>An array containing the two normals, each represented by a vector.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array.&lt;<a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a>></span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id=".scalarProjection"><span class="type-signature">(static) </span>scalarProjection<span class="signature">(vecA, vecB)</span><span class="type-signature"> &rarr; {Number}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line573">line 573</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Returns the scalar projection of a vector on another vector.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>vecA</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>The vector to be projected.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>vecB</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>The vector to be projection upon.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The scalar component.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Number</span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id=".subtract"><span class="type-signature">(static) </span>subtract<span class="signature">(vecA, vecB)</span><span class="type-signature"> &rarr; {<a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line431">line 431</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Subtracts one vector from another and returns the result as a new vector.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>vecA</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>The minuend.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>vecB</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>The subtrahend.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>Returns the difference of two vectors.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id=".threePointangle"><span class="type-signature">(static) </span>threePointangle<span class="signature">(vecA, vecB, vecC)</span><span class="type-signature"> &rarr; {Number}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line556">line 556</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Returns the angle between two vectors based on a third vector in between.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>vecA</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>A vector.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>vecB</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>A vector.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>vecC</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>A vector.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>The angle in radians.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Number</span>


    </dd>
</dl>

    


        
            

    

    <h4 class="name" id=".units"><span class="type-signature">(static) </span>units<span class="signature">(vecA, vecB)</span><span class="type-signature"> &rarr; {Array.&lt;<a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a>>}</span></h4>

    




<dl class="details">

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="Vector2.js.html">Vector2.js</a>, <a href="Vector2.js.html#line496">line 496</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>





<div class="description">
    <p>Returns the unit (normalized normal) vectors of a line spanned by two vectors.</p>
</div>











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>vecA</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>A vector spanning the line.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>vecB</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a></span>


            
            </td>

            

            

            <td class="description last"><p>A vector spanning the line.</p></td>
        </tr>

    
    </tbody>
</table>














<h5>Returns:</h5>

        
<div class="param-desc">
    <p>An array containing the two unit vectors.</p>
</div>



<dl class="param-type">
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array.&lt;<a href="SmilesDrawer.Vector2.html">SmilesDrawer.Vector2</a>></span>


    </dd>
</dl>

    


        
    

    

    
</article>

</section>




</div>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Nov 01 2017 22:35:30 GMT+0100 (W. Europe Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
</body>
</html>